import {request} from "@/api/request";
export const createOrder=(params)=>request({url:`/api/orders`,method:'post',params})
export const getOrderPreview=()=>request({url:`/api/orders/preview`})
export const  payOrder=(order,params)=>request({url:`/api/orders/${order}/pay`,params})
export const parOrderStatus=(order)=>request({url:`/api/orders/${order}/status`})
export const getOrderList=(params)=>request({url:`/api/orders`,params})
export const getOrderDetail=(order)=>request({url:`/api/orders/${order}`,
  params:{
  include:'user,orderDetails.goods'
}
})
export const confirmOrder=(order)=>request({url:`/api/orders/${order}/confirm`,method:'patch'})
export const viewExpress=(order)=>request({url:`/api/orders/${order}/express`})
